use ansi_term::{Color, Style};

// 打印彩色文本到终端
#[test]
fn demo01() {
    println!(
        "This is {} in color, {} in color and {} in color",
        Color::Red.paint("Red"),
        Color::Green.paint("Green"),
        Color::Blue.paint("Blue")
    );
}

// 终端中的粗体文字
#[test]
fn demo02() {
    println!(
        "{} and this is not",
        Style::new().bold().paint("This is Bold")
    );
}

// 终端中的粗体和彩色文本
#[test]
fn demo03() {
    println!(
        "{}, {} and {}",
        Color::Yellow.paint("Yellow"),
        Style::new().bold().paint("Bold"),
        Color::Yellow.bold().paint("Yellow Bold")
    );
}

fn main() {}
